#include <iostream>
#include <unistd.h>
#include <fcntl.h>

using std::cout;
using std::endl;

int main(int args, char *argv[])
{
    printf("pid=%d\nppid=%d\nuid=%d\ngid=%d\neuid=%d\negid=%d\n",
        getpid(), getppid(), getuid(), getgid(), geteuid(), getegid());

    int fd = open("../data/hello.txt", O_RDWR);
    char buf[1024]{0};
    read(fd, buf, 1024);
    cout << buf << endl;
    return 0;
}